import React from 'react'
import NewsPublish from '@/components/publish-manage/NewsPublish'
import usePublish from '@/components/publish-manage/usePublish'
import { Button } from 'antd'

function Sunset() {
  const { dataSource, handleDelete, handlePublish } = usePublish(3)
  return (
    <div>
      <NewsPublish
        button={(item) => {
          return (
            <>
              <Button onClick={() => handlePublish(item)} type="primary">上线</Button>
              &nbsp;&nbsp;
              <Button danger onClick={() => handleDelete(item)}>删除</Button>
            </>
          )
        }}
        dataSource={dataSource}/>
    </div>
  )
}

export default Sunset